package Week1.J0417;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class MinSectionAdd_xv {
    public static void main(String[] args) throws IOException {
        Read in = new Read();
        int n = in.nextInt();
        int x = in.nextInt();
        int[] arr = new int[n+1];
        for (int i = 1; i <= n; i++) {
            arr[i] = in.nextInt();
        }

        int left = 1;
        int right = 1;
        int retLeft = -1;
        int retRight = -1;
        int sum = 0;
        int retLen = Integer.MAX_VALUE;

        while (right <= n) {
            sum += arr[right];
            while (sum >= x) {
                if (right - left + 1 < retLen) {
                    retRight = right;
                    retLeft = left;
                    retLen = right - left + 1;
                }
                sum -= arr[left++];
            }
            right++;
        }

        System.out.println(retLeft+" "+retRight);
    }
}



class Read {//自定义快读读入
    //字符串裁剪
    StringTokenizer st = new StringTokenizer("");

    //1.字节流System.in->字符流InputStreamReader
    //2.带内存缓冲区的字符流BufferedReader
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));


    String next() throws IOException {
        //为什么要while循环，因为可能读取的数据不止一行，有多行就需要多次取
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(bf.readLine());//先拿一行的数据
        }
        return st.nextToken();//对这一行的数据进行裁剪，拿到第一个数据
    }

    String nextLine() throws IOException {
        return bf.readLine();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}
